package com.changgou.ad.feign;

import com.changgou.pojo.Ad;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/****
 * @Author:lx
 * @Description:
 * @Date 2019/7/24 15:44
 *****/
@FeignClient(name = "business")
@RequestMapping("/ad")
public interface AdFeign {



    //根据position查询所有广告集合
    @GetMapping("/findAdListByposition/{position}")
    public List<Ad> findAdListByposition(@PathVariable(name = "position") String position);

    @GetMapping("/{id}")
    public Ad findById(@PathVariable Integer id);

}
